namespace GGPhysics
{
	public struct CollidingBody
	{
		public PhysicsBody body;

		public PhysicsBody.Transform transformAtCollision;

		public PhysicsBody.MotionParams motionBeforeCollision;

		public PhysicsBody.MotionParams motionResolution;

		public PhysicsBody.Transform transformResolution;

		public bool useMassMult;

		public float massMult;

		public float mass
		{
			get
			{
				float num = body.shape.mass;
				if (useMassMult)
				{
					num *= massMult;
				}
				return num;
			}
		}

		public static CollidingBody identity
		{
			get
			{
				CollidingBody result = default(CollidingBody);
				result.transformResolution.SetIdentityTransform();
				result.transformAtCollision.SetIdentityTransform();
				return result;
			}
		}

		public void ApplyResolution()
		{
			body.currentTransform.Set(transformResolution);
			body.myMotion.Set(motionResolution);
		}

		public void SetMotionBeforCollision()
		{
			if (body != null)
			{
				motionBeforeCollision.Set(body.myMotion);
			}
		}
	}
}
